import Vue from 'vue'
import Router from 'vue-router'

import Home from '@/page/Home'
import Prefecture from '@/page/Prefecture'
import Login from '@/page/Login'
import Login2 from '@/page/Login2'
import Reg from '@/page/Reg'
import ForgetPassWord from '@/page/ForgetPassWord'
import Content from '@/page/Content'
import Profile from '@/page/Profile'

import Sale from '@/page/sale/Sale'
import Type from '@/page/sale/Type'
import NewStep from '@/page/sale/NewStep'
import Brand from '@/page/sale/Brand'
import Sale2 from '@/page/sale/Sale2'
import Sale3 from '@/page/sale/Sale3'
import SaleSuccess from '@/page/sale/SaleSuccess'
import Shop from '@/page/Shop'
import ShopSpecial from '@/page/shop/ShopSpecial'
import ShopType from '@/page/shop/ShopType'
import paySuccess from '@/page/shop/paySuccess'
import payError from '@/page/shop/payError'
import Details from '@/page/shop/details'
import Me from '@/page/Me'
import Search from '@/page/search/Search'
import Message from '@/page/Message'
import Article from '@/page/bbs/Article'
import SearchAll from '@/page/search/SearchAll'
import SearchUser from '@/page/search/SearchUser'
import SearchShop from '@/page/search/SearchShop'
import SearchArticle from '@/page/search/SearchArticle'
import MeIndex from '@/page/me/MeIndex'
import OtherIndex from '@/page/me/otherIndex'
import OtherShop from '@/page/me/otherShop'
import SetUp from '@/page/me/SetUp'
import Information from '@/page/me/information'
import People from '@/page/me/people'
import Head from '@/page/me/head'
import SignName from '@/page/me/SignName'
import Address from '@/page/me/Address'
import AddAddress from '@/page/me/AddAddress'
import Phone from '@/page/me/phone'
import PassWord from '@/page/me/passWord'
import Suggest from '@/page/me/Suggest'
import Money from '@/page/Me/Money'
import Opinion from '@/page/me/Opinion'
import Shopping from '@/page/me/shopping'
import EditShopping from '@/page/me/editShopping'
import Order from '@/page/me/order'
import OrderOne from '@/page/me/orderOne'
import AllOrder from '@/page/me/orderall'
import fahuoOrder from '@/page/me/orderfahuo'
import awaitOrder from '@/page/me/orderpay'
import pingjiaOrder from '@/page/me/orderpingjia'
import shouhuoOrder from '@/page/me/ordershouhuo'
import BuyerMessage from '@/page/me/BuyerMessage'
import Coupon from '@/page/me/coupon'
import Purse from '@/page/me/purse'
import Detail from '@/page/me/detail'
import Gold from '@/page/me/Gold'
import Attention from '@/page/me/Attention'
import Fans from '@/page/me/fans'
import Follow from '@/page/me/follow'
import Store from '@/page/me/store'
import Collect from '@/page/me/collect'
import MyMessage from '@/page/me/Message'
import MsgTalk from '@/page/me/MsgTalk'
import MsgDiscuss from '@/page/me/MsgDiscuss'
import MsgPraise from '@/page/me/MsgPraise'
import MsgFans from '@/page/me/MsgFans'
import MsgNews from '@/page/me/MsgNews'
import saleAll from '@/page/me/saleAll'
import saleShenhe from '@/page/me/saleShenhe'
import saleWait from '@/page/me/saleWait'
import saleDeliver from '@/page/me/saleDeliver'
import saleIng from '@/page/me/saleIng'
import saleUnpay from '@/page/me/saleUnpay'
import saleOver from '@/page/me/saleOver'
import seeorder from '@/page/me/seeorder'
import sharePage from '@/page/me/sharePage'
import pursesubmit from '@/page/me/purseSubmit'
import Pursing from '@/page/me/pursing'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/home',
      name: 'Home',
      component: Home,
      meta: {
        title:'女神有财',
      }

    },
    {
      path: '/prefecture',
      name: 'Prefecture',
      title:'',
      component: Prefecture,
      meta: {
        title:'女神有财',
      }
    },
    {
      path: '/message',
      name: 'Message',
      component: Message,
      title:'',
      meta: {
          requireAuth: true,
          title:'女神有财',

      }
    },
    {
      path: '/search',
      name: 'Search',
      component: Search,
      meta: {
        title:'搜索',
      }

    },
    {
      path: '/search/search-all',
      name: 'SearchAll',
      component: SearchAll,

      title:'',
      meta: {
        title:'搜索结果',
      }
    },
    {
      path: '/search/user',
      name: 'SearchUser',
      title:'',
      component: SearchUser,
      meta: {
        title:'搜索结果',
      }
    },
    {
      path: '/search/shop',
      name: 'SearchShop',
      title:'',
      component: SearchShop,
      meta: {
        title:'搜索结果',
      }
    },
    {
      path: '/search/article',
      name: 'SearchArticle',
      title:'',
      component: SearchArticle,
      meta: {
        title:'搜索结果',
      }
    },
    {
      path: '/login',
      name: 'Login',
      title:'',
      component: Login,
      meta: {
        title:'手机快捷登录',
      }
    },
    {
      path: '/login2',
      name: 'Login2',
      title:'账号密码登录',
      component: Login2,
      meta: {
        title:'账号密码登录',
      }
    },
    {
      path: '/reg',
      name: 'Reg',
      title:'注册',
      component: Reg,
      meta: {
        title:'注册',
      }
    },
    {
      path: '/forgetpassword',
      name: 'ForgetPassWord',
      title:'忘记密码',
      component: ForgetPassWord,
      meta: {
        title:'忘记密码',
      }
    },
    {
      path: '/content',
      name: 'Content',
      title:'小社',
      component: Content,
      meta: {
        title:'小社',
      }
    },
    {
      path: '/profile/:id',
      name: 'Profile',
      component: Profile
    },
    {
      path: '/content/article/:id',
      name: 'Article',
      title:'',
      component: Article,
      meta: {
        title:'小社',
      }
    },
    {
      path: '/sale',
      name: 'Sale',
      component: Sale,

      meta: {
        requireAuth: true,
        title:'寄卖',
      }
    },
    {
      path: '/sale2',
      name: 'Sale2',
      component: Sale2,

      meta: {
        requireAuth: true,
        title:'寄卖',
      }
    },
    {
      path: '/sale3',
      name: 'Sale3',
      component: Sale3,

      meta: {
        requireAuth: true,
        title:'寄卖',
      }
    },
    {
      path: '/salesuccess',
      name: 'SaleSuccess',
      title:'',
      component: SaleSuccess,
      meta: {
        title:'寄卖成功',
      }
    },
    {
      path: '/me/saleall',
      name: 'saleAll',
      component: saleAll,
      meta: {
        title:'我的寄卖',
        requireAuth: true,
      }
    },
    {
      path: '/me/information',
      name: 'Information',
      component: Information,
      meta: {
        title:'相关协议',
        requireAuth: true,
      }
    },
    {
      path: '/me/saleshenhe',
      name: 'saleShenhe',
      component: saleShenhe,
      meta: {
        title:'我的寄卖',
        requireAuth: true,
      }
    },
    {
      path: '/me/salewait',
      name: 'saleWait',
      component: saleWait,
      meta: {
        title:'我的寄卖',
        requireAuth: true,
      }
    },
    {
      path: '/me/saledeliver',
      name: 'saleDeliver',
      component: saleDeliver,
      meta: {
        title:'我的寄卖',
        requireAuth: true,
      }
    },
    {
      path: '/me/saleing',
      name: 'saleIng',
      component: saleIng,
      meta: {
        title:'我的寄卖',
        requireAuth: true,
      }
    },
    {
      path: '/me/saleunpay',
      name: 'saleUnpay',
      component: saleUnpay,
      meta: {
        title:'我的寄卖',
        requireAuth: true,
      }
    },
    {
      path: '/me/saleover',
      name: 'saleOver',
      component: saleOver,
      title:'我的寄卖',
      meta: {
        title:'我的寄卖',
        requireAuth: true,
      }
    },
    {
      path: '/type',
      name: 'Type',
      title:'',
      component: Type,
      meta: {
        title:'选择分类',
      }
    },
    {
      path: '/newstep',
      name: 'NewStep',
      title:'',
      component: NewStep,
      meta: {
        title:'女神有财',
      }
    },
    {
      path: '/brand',
      name: 'Brand',
      component: Brand,
      meta: {
        title:'女神有财',
      }
    },
    {
      path: '/shop',
      name: 'Shop',
      title:'',
      component: Shop,
      meta: {
        title:'女神商城',
      }
    },
    {
      path: '/shopspecial',
      name: 'ShopSpecial',
      title:'女神商城',
      component: ShopSpecial,
      meta: {
        title:'女神商城',
      }
    },
    {
      path: '/Shoptype',
      name: 'ShopType',
      component: ShopType,
      meta: {
        title:'女神商城',
      }
    },
    {
      path: '/shop/details/:id',
      name: 'Details',
      title:'',
      component: Details,
      meta: {
        title:'女神商城',
      }
    },
    {
      path: '/me',
      name: 'Me',
      component: Me,
      meta: {
        title:'我的主页',
        requireAuth: true,
      }
    },
    {
      path: '/me/meindex',
      name: 'MeIndex',
      component: MeIndex,
      meta: {
        title:'我的主页',
        requireAuth: true,
      }
    },
    {
      path: '/otherindex',
      name: 'OtherIndex',
      title:'',
      component: OtherIndex,
      meta: {
        title:'别人的主页',
        requireAuth: true,
      }
    },
    {
      path: '/othershop',
      name: 'OtherShop',
      component: OtherShop,
      meta: {
        title:'别人的商品',
        // requireAuth: true,
      }
    },
    {
      path: '/me/setup',
      name: 'SetUp',
      component: SetUp,
      meta: {
        title:'设置',
        requireAuth: true,
      }
    },
    {
      path: '/me/people',
      name: 'People',
      component: People,
      meta: {
        title:'设置',
        requireAuth: true,
      }
    },
    {
      path: '/me/head',
      name: 'Head',
      component: Head,
      title:'设置',
      meta: {
        title:'设置',
        requireAuth: true,
      }
    },
    {
      path: '/me/signname',
      name: 'SignName',
      component: SignName,
      title:'设置',
      meta: {
        title:'设置',
        requireAuth: true,
      }
    },
    {
      path: '/me/address',
      name: 'Address',
      component: Address,
      meta: {
        title:'设置',
        requireAuth: true,
      }
    },
    {
      path: '/me/add',
      name: 'AddAddress',
      component: AddAddress,
      title:'设置',
      meta: {
        title:'设置',
        requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
      }
    },
    {
      path: '/me/phone',
      name: 'Phone',
      component: Phone,
      title:'设置',
      meta: {
        title:'设置',
        requireAuth: true,
      }
    },
    {
      path: '/me/password',
      name: 'PassWord',
      component: PassWord,
      title:'设置',
      meta: {
        title:'设置',
        requireAuth: true,
      }
    },
    {
      path: '/me/suggest',
      name: 'Suggest',
      component: Suggest,
      meta: {
        title:'意见反馈',
        requireAuth: true,
      }
    },
    {
      path: '/me/opinion',
      name: 'Opinion',
      component: Opinion,
      title:'',
      meta: {
        title:'意见反馈',
        requireAuth: true,
      }
    },
    {
      path: '/me/shopping',
      name: 'Shopping',
      component: Shopping,
      title:'',
      meta: {
        title:'购物车',
        requireAuth: true,
      }
    },
    {
      path: '/me/editshopping',
      name: 'EditShopping',
      component: EditShopping,
      meta: {
        title:'购物车',
        requireAuth: true,
      }
    },
    {
      path: '/me/order',
      name: 'Order',
      component: Order,
      meta: {
        title:'我的订单',
        requireAuth: true,
      }
    },
    {
      path: '/me/orderone',
      name: 'OrderOne',
      component: OrderOne,
      title:'我的订单',
      meta: {
        title:'我的订单',
        requireAuth: true,
      }
    },
    {
      path: '/me/allorder',
      name: 'AllOrder',
      component: AllOrder,
      title:'我的订单',
      meta: {
        title:'我的订单',
        requireAuth: true,
      }
    },
    {
      path: '/me/fahuoorder',
      name: 'fahuoOrder',
      component: fahuoOrder,
      title:'我的订单',
      meta: {
        title:'我的订单',
        requireAuth: true,
      }
    },
    {
      path: '/me/awaitorder',
      name: 'awaitOrder',
      component: awaitOrder,
      title:'我的订单',
      meta: {
        title:'我的订单',
        requireAuth: true,
      }
    },
    {
      path: '/me/shouhuoorder',
      name: 'shouhuoOrder',
      component: shouhuoOrder,
      title:'我的订单',
      meta: {
        title:'我的订单',
        requireAuth: true,
      }
    },
    {
      path: '/me/pingjiaorder',
      name: 'pingjiaOrder',
      component: pingjiaOrder,
      title:'我的订单',
      meta: {
        title:'我的订单',
        requireAuth: true,
      }
    },
    {
      path: '/me/paysuccess',
      name: 'paySuccess',
      title:'我的订单',
      component: paySuccess,
      meta: {
        title:'我的订单',
        // requireAuth: true,
      }
    },
    {
      path: '/me/payerror',
      name: 'payError',
      title:'我的订单',
      component: payError,
      meta: {
        title:'我的订单',
        // requireAuth: true,
      }
    },
    {
      path: '/me/seeorder',
      name: 'seeorder',
      component: seeorder,
      meta: {
        title:'我的订单',
        requireAuth: true,
      }
    },
    {
      path: '/me/buyermessage',
      name: 'BuyerMessage',
      component: BuyerMessage,
      meta: {
        title:'我的订单',
        requireAuth: true,
      }
    },
    {
      path: '/me/coupon',
      name: 'Coupon',
      component: Coupon,
      meta: {
        title:'女神有财',
        requireAuth: true,
      }
    },
    {
      path: '/me/purse',
      name: 'Purse',
      component: Purse,
      meta: {
        title:'我的钱包',
        requireAuth: true,
      }
    },
    {
      path: '/me/detail',
      name: 'Detail',
      component: Detail,
      meta: {
        title:'女神有财',
        requireAuth: true,
      }
    },
    {
      path: '/me/gold',
      name: 'Gold',
      component: Gold,
      meta: {
        title:'女神有财',
        requireAuth: true,
      }
    },
    {
      path: '/me/attention',
      name: 'Attention',
      component: Attention,
      meta: {
        title:'女神有财',
        requireAuth: true,
      }
    },
    {
      path: '/me/fans',
      name: 'Fans',
      component: Fans,
      meta: {
        title:'我的粉丝',
        requireAuth: true,
      }
    },
    {
      path: '/me/follow',
      name: 'Follow',
      component: Follow,
      meta: {
        title:'我的关注',
        requireAuth: true,
      }
    },
    {
      path: '/me/store',
      name: 'Store',
      component: Store,
      meta: {
        title:'我的门店',
        requireAuth: false,
      }
    },
    {
      path: '/me/collect',
      name: 'Collect',
      component: Collect,
      meta: {
        title:'我的收藏',
        requireAuth: true,
      }
    },
    {
      path: '/me/mymessage',
      name: 'MyMessage',
      component: MyMessage,
      meta: {
        title:'私信',
        requireAuth: true,
      }
    },
    {
      path: '/me/msgtalk',
      name: 'MsgTalk',
      component: MsgTalk,
      meta: {
        title:'',
        requireAuth: true,
      }
    },
    {
      path: '/me/msgdiscuss',
      name: 'MsgDiscuss',
      component: MsgDiscuss,
      meta: {
        title:'评论',
        requireAuth: true,
      }
    },
    {
      path: '/me/msgpraise',
      name: 'MsgPraise',
      component: MsgPraise,
      meta: {
        title:'赞',
        requireAuth: true,
      }
    },
    {
      path: '/me/msgfans',
      name: 'MsgFans',
      component: MsgFans,
      meta: {
        title:'粉丝',
        requireAuth: true,
      }
    },
    {
      path: '/me/msgnews',
      name: 'MsgNews',
      component: MsgNews,
      meta: {
        title:'通知',
        requireAuth: true,
      }
    },
    {
      path: '/me/money',
      name: 'Money',
      component: Money,
      meta: {
        title:'女神有财',
        requireAuth: true,
      }
    },
    {
      path: '/me/pursesubmit',
      name: 'pursesubmit',
      component: pursesubmit,
      meta: {
        title:'提现',
        requireAuth: true,
      }
    },,
    {
      path: '/me/pursing',
      name: 'Pursing',
      component: Pursing,
      title:'提现',
      meta: {
        requireAuth: true,
      }
    },
    {
      path: '/me/sharepage',
      name: 'sharePage',
      component: sharePage,
      meta: {
        title:'女神有财',
        // requireAuth: true,
      }
    },

    {
      path: '/',
      redirect: '/home',
      meta: {
        title:'女神有财',
      }
    },
    {
      path: '/*',
      redirect: '/home',
      meta: {
        title:'女神有财',
      }
    },
  ]
})
